export default {
    createElement(marker, tag, className) {
        let el = document.createElement(tag || 'div')
        el.setAttribute(marker, '')
        el.setAttribute('class', className)
        document.body.appendChild(el)
    },
    removeElement(marker) {
        let el = document.querySelector(marker) || document.querySelector(`[${marker}]`)
        if (el)
            document.body.removeChild(el)
    },
    timeout(duration = 0) {
        return new Promise((resolve, reject) => {
            setTimeout(resolve, duration);
        })
    }
}
